package com.turing.data.model.domain.review;

    import com.baomidou.mybatisplus.annotation.IdType;
    import com.baomidou.mybatisplus.annotation.TableId;
    import com.turing.data.vo.in.element.ReviewContentVo;
    import com.turing.orm.model.domain.common.BaseDo;
    import java.io.Serializable;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
    import lombok.Builder;
    import lombok.Data;
    import lombok.EqualsAndHashCode;
    import lombok.experimental.Accessors;
    import lombok.AllArgsConstructor;
    import lombok.NoArgsConstructor;


/**
* @Description 记录需要审核的内容
* @Author livin
* @Date 2022-01-19
*/
@ApiModel(value ="记录需要审核的内容")
@Data
@EqualsAndHashCode(callSuper = false)
@Builder(toBuilder = true)
@Accessors(chain = true)
@AllArgsConstructor
@NoArgsConstructor
public class ReviewContent extends BaseDo<ReviewContent> {

    public ReviewContent( ReviewContentVo contentVo ){
        this.id = contentVo.getId();
        this.taskSn = contentVo.getTaskSn();
        this.childTaskSn = contentVo.getChildTaskSn();
        this.type = contentVo.getType();
        this.eleId = contentVo.getEleId();
        this.eleName = contentVo.getEleName();
        this.rowSequence = contentVo.getRowSequence();
        this.columnNo = contentVo.getColumnNo();
        this.cus_sample_id = contentVo.getCus_sample_id();
        this.sample_id = contentVo.getSample_id();
        this.degree = contentVo.getDegree();
        this.elemTruth = contentVo.getElemTruth();
        this.globalPos = contentVo.getGlobal_pos() == null ? "[]" : contentVo.getGlobal_pos().toString();
        this.start = contentVo.getStart();
        this.end = contentVo.getEnd();
        this.startLineNo = contentVo.getStartLineNo();
        this.endLineNo = contentVo.getEndLineNo();
        this.lineNo = contentVo.getLineNo();
        this.page = contentVo.getPage();
        this.paraInfo = contentVo.getPara_info() == null ? "[]" : contentVo.getPara_info().toString();
        this.pos = contentVo.getPos() == null ? "[]" : contentVo.getPos().toString();
        this.posInfo = contentVo.getPos_info() == null ? "[]" : contentVo.getPos_info().toString();
        this.text = contentVo.getText();
        this.businessValue = contentVo.getBusinessValue();
        this.parentEleId = contentVo.getParentEleId();
        this.sequence = contentVo.getSequence();
        this.nextSequence = contentVo.getNextSequence();
        this.nextRow = contentVo.getNextRow();
        this.firstRow = contentVo.getFirstRow();
        this.firstSequence = contentVo.getFirstSequence();
        this.subProductId = contentVo.getSubProductId();
    }

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("task_sn")
    private String taskSn;

    @TableField("child_task_sn")
    private String childTaskSn;

    @TableField("type")
    private Integer type;

    @TableField("ele_id")
    private Integer eleId;

    @TableField("ele_name")
    private String eleName;

    @TableField("row_sequence")
    private String rowSequence;

    @TableField("column_no")
    private Integer columnNo;

    @TableField("cus_sample_id")
    private String cus_sample_id;

    @TableField("sample_id")
    private String sample_id;

    @TableField("degree")
    private String degree;

    @TableField("elem_truth")
    private String elemTruth;

    @TableField("global_pos")
    private String globalPos;

    @TableField("start")
    private Integer start;

    @TableField("end")
    private Integer end;

    @TableField("start_line_no")
    private Integer startLineNo;

    @TableField("end_line_no")
    private Integer endLineNo;

    @TableField("line_no")
    private Integer lineNo;

    @TableField("page")
    private Integer page;

    @TableField("para_info")
    private String paraInfo;

    @TableField("pos")
    private String pos;

    @TableField("pos_info")
    private String posInfo;

    @TableField("text")
    private String text;

    @TableField("business_value")
    private String businessValue;

    @TableField("parent_ele_id")
    private Integer parentEleId;

    @TableField("sequence")
    private String sequence;

    @TableField("next_sequence")
    private String nextSequence;

    @TableField("next_row")
    private String nextRow;

    @TableField("first_row")
    private Integer firstRow;

    @TableField("first_sequence")
    private Integer firstSequence;

    @TableField("sub_product_id")
    private Integer subProductId;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}

